package com.codenum.codegenerator;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

/**
* the Aiqrumbr type
*/
@SuppressWarnings("ALL")
public class Aiqrumbr {


        private static volatile Aiqrumbr instance;

        /**
        * 方法MethodMap
        */
        private Map<String, Method> methodMap = new HashMap<>(32);

        private Map<String, Object> saleTypeMap = new HashMap<>(64);

        public static Aiqrumbr getInstance() {
            if (instance == null) {
                synchronized (Aiqrumbr.class) {
                    if (instance == null) {
                        instance = new Aiqrumbr();
                    }
                }
            }
            return instance;
        }


        private Aiqrumbr() {

        }



    public  Boolean judgeActgzszeum(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeOfenhggncu(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeMxpxmdbfft(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeNhwkhmcyzp(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeFnqzvjyzkg(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeIwfspzfipy(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeBypowhjizv(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeAqibzknwbr(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeHdicckabsx(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeCrjkufslks(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeOouvhmegei(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeNdazuhions(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeCzpuucvawy(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeHaktbvcnny(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }

    private String  actgzszeum;
    private String  ofenhggncu;
    private String  mxpxmdbfft;
    private String  nhwkhmcyzp;
    private String  fnqzvjyzkg;
    private String  iwfspzfipy;
    private String  bypowhjizv;
    private String  aqibzknwbr;
    private String  hdicckabsx;
    private String  crjkufslks;
    private String  oouvhmegei;
    private String  ndazuhions;
    private String  czpuucvawy;
    private String  haktbvcnny;


    public void setActgzszeum(String actgzszeum){
    this.actgzszeum = actgzszeum;
    }

    public String getActgzszeum(){
    return this.actgzszeum;
    }
    public void setOfenhggncu(String ofenhggncu){
    this.ofenhggncu = ofenhggncu;
    }

    public String getOfenhggncu(){
    return this.ofenhggncu;
    }
    public void setMxpxmdbfft(String mxpxmdbfft){
    this.mxpxmdbfft = mxpxmdbfft;
    }

    public String getMxpxmdbfft(){
    return this.mxpxmdbfft;
    }
    public void setNhwkhmcyzp(String nhwkhmcyzp){
    this.nhwkhmcyzp = nhwkhmcyzp;
    }

    public String getNhwkhmcyzp(){
    return this.nhwkhmcyzp;
    }
    public void setFnqzvjyzkg(String fnqzvjyzkg){
    this.fnqzvjyzkg = fnqzvjyzkg;
    }

    public String getFnqzvjyzkg(){
    return this.fnqzvjyzkg;
    }
    public void setIwfspzfipy(String iwfspzfipy){
    this.iwfspzfipy = iwfspzfipy;
    }

    public String getIwfspzfipy(){
    return this.iwfspzfipy;
    }
    public void setBypowhjizv(String bypowhjizv){
    this.bypowhjizv = bypowhjizv;
    }

    public String getBypowhjizv(){
    return this.bypowhjizv;
    }
    public void setAqibzknwbr(String aqibzknwbr){
    this.aqibzknwbr = aqibzknwbr;
    }

    public String getAqibzknwbr(){
    return this.aqibzknwbr;
    }
    public void setHdicckabsx(String hdicckabsx){
    this.hdicckabsx = hdicckabsx;
    }

    public String getHdicckabsx(){
    return this.hdicckabsx;
    }
    public void setCrjkufslks(String crjkufslks){
    this.crjkufslks = crjkufslks;
    }

    public String getCrjkufslks(){
    return this.crjkufslks;
    }
    public void setOouvhmegei(String oouvhmegei){
    this.oouvhmegei = oouvhmegei;
    }

    public String getOouvhmegei(){
    return this.oouvhmegei;
    }
    public void setNdazuhions(String ndazuhions){
    this.ndazuhions = ndazuhions;
    }

    public String getNdazuhions(){
    return this.ndazuhions;
    }
    public void setCzpuucvawy(String czpuucvawy){
    this.czpuucvawy = czpuucvawy;
    }

    public String getCzpuucvawy(){
    return this.czpuucvawy;
    }
    public void setHaktbvcnny(String haktbvcnny){
    this.haktbvcnny = haktbvcnny;
    }

    public String getHaktbvcnny(){
    return this.haktbvcnny;
    }

    void setMethodMap(Map<String, Method> methodMap) {
        this.methodMap = methodMap;
    }

   void setSaleTypeMap(Map<String, Object> saleTypeMap) {
        this.saleTypeMap = saleTypeMap;
    }

    public Boolean judgeAttributeValue(String saleType, String methodName) {
        try {
            Object saleTypeObject = saleTypeMap.get(saleType);
            String targetMethod = methodName.replace("judge", "get");
            String attr = methodName.replace("judge", "");
            Method method = methodMap.get(targetMethod);
            Object invoke = method.invoke(saleTypeObject);
            return Objects.isNull(invoke) ? Boolean.FALSE : Objects.equals(invoke.toString().toLowerCase(), attr.toLowerCase());
        } catch (InvocationTargetException e) {
            throw new RuntimeException(e.getMessage());
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e.getMessage());
        }
    }

}